import type { RouteRecordRaw } from 'vue-router'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'

/** 扩展的路由配置类型 */
export type AppRouteRecordRaw = RouteRecordRaw & {
    hidden?: boolean
}

/** 顶部进度条配置 */
export const configureNProgress = () => {
    NProgress.configure({
        easing: 'ease',
        speed: 600,
        showSpinner: false,
        trickleSpeed: 200,
        parent: 'body'
    })
}
